package IOStream.FileInputStreamDome;

import java.io.FileInputStream;
import java.io.IOException;

/**
 * ClassName:FileInputStream002
 * Package:IOStream.FileInputStreamDome
 * Description:
 *
 * @Author:ZhangXin
 * @Create2023/2/28-18:09
 * @Version:v1.0
 */
public class FileInputStream002 {
    /**
     * FileInputStream循环读取
     */
    public static void main(String[] args) throws IOException {
        //创建对象
        FileInputStream fis = new FileInputStream("E:\\aaa\\a.txt");
        //循环读取
        /**
         * read:表示读取数据,而且是读取一个数据就移动一次指针
         * */
        int b;
        while ((b = fis.read()) != -1) {
            System.out.print((char) b);
        }
        //释放资源
        fis.close();
    }
}
